#pragma once


#include "e2d/core/Component.h"
#include "e2d/core/trans/Grid.h"

namespace e2d
{
	struct  LayoutGrid : public e2d::Component
	{
		FXCC_DEFINE_COMPONENT_LABEL(LayoutGrid);

		int m_PickupStartIndex{ 0 };

		glm::ivec3 m_NumSep{ 4,4,1 };
		
		glm::vec3 m_SepSize{ 4.0f,4.0f,4.0f };

		void OnUpdate();

		void OnUpdateRuntime() override;

		void UpdateGridChildren();

		void UpdateGridChild(e2d::Entity* entity);
		
		void UpdateGridChildTransform(const e2d::Grid& target, e2d::Transform& inst);
	};
};